A program which uses only the standard I/O functions developed for UNIX systems will be portable between many different platforms, but its poor user interface will be intolerable to most Macintosh users. Since standard I/O programs usually do not use a Macintosh-style event loop, the non-portable part of Macintosh programs is often quite large.
A class library can be used to isolate all the machine-dependent code in a complex application, including the very style of the user interface. Reliance upon standard- ized class libraries may eventually lead to portability of highly complex applications.
The Think Class Library* (TCL) distributed with Think C 4.0 offers an interesting and useful example. The TCL includes the Application class which implements the usual Macintosh event loop. The user derives a specialized class for his/her application, overriding certain methods. In addition to simplifying the notoriously difficult task of writing Macintosh software, this library offers the potential for greater portability of Macintosh applications if/when versions for other platforms are made available.